<template>
  <div>


	<myheader></myheader>

	<br /><br />
	<!-- 面包屑导航 -->
	<Breadcrumb :datas='datas'></Breadcrumb>


	<section class="featured-block text-center">
		<div class="container">
            <table>
                <tr>
                    <th>ID</th>
                    <th>商品名称</th>
                    <th>商品描述</th>
                    <th>商品图片</th>
                    <th>商品规格</th>
                    <th>商品类别</th>
                    <th>演示视频</th>
                    <th>商品价格</th>
                </tr>
                <tr v-for="item,index in search_data">
                    <td>{{ index }}</td>
                    <td>{{ item.name }}</td>
                    <td>{{ item.desc }}</td>
                    <td><img :src="'http://localhost:8000/static/upload/' + item.img" alt="" width=100px></td>
                    <td>{{ item.param }}</td>
                    <td>{{ item.cid }}</td>
                    <td><video :src="'http://localhost:8000/static/upload/' + item.video" width=100px></video></td>
                    <td>{{ item.price }}</td>
                </tr>
            </table>
		</div>

	</section>
	<myfooter></myfooter>

	
	

    
  </div>
  
</template>


 
<script>

// 组件包含
import header from './header.vue';
import footer from './footer.vue';



export default {
  data () {
    return {
	  datas: [
		  {title: '首页', route:{name: 'index'}},
		  {title: '搜索页面', route:{name: 'search'}},
        ],
      search_data: []
    }
  },
  mounted:function(){
      this.get_goodsSearch()

   
  },
  methods:{
	  get_goodsSearch(){
        let word = this.$route.query.word
        this.axios.get("http://localhost:8000/goodssearch/", {params:{'word':word}}).then(result=>{
            this.search_data = result.data
        })
      }
     
  },
  // 生命组件
  components:{
	  'myheader':header,
	  'myfooter':footer,
  }
}


</script>
 
<style>



</style>